c# format json

100

object to json c# -

using Newtonsoft.Json;

var jsonString = JsonConvert.SerializeObject(obj);

c# format json -

using Newtonsoft.Json;

private static string FormatPrettyJson(object myobject)
{
    string json = JsonConvert.SerializeObject(object, Formatting.Indented);

    return json;
}

Comments

Submit
0 Comments